package com.china.school.resource;

import org.springframework.core.io.ClassPathResource;

import java.io.IOException;

public class ClassPathResourceTest {
    public static void main(String[] args) throws IOException {

        //不需要指定classpath，因为默认就是 classpath
        ClassPathResource classPathResource = new ClassPathResource("a.txt");
        System.out.println(classPathResource.getFile().getAbsolutePath());

    }
}
